package com.example.demo.Controller;


import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController


public class TestController {
    private Logger logger = LoggerFactory.getLogger(TestController.class);

    @Transactional
    public void fun(){
        System.out.println("开始");
        log.info("日志框架的测试");
        throw  new ArithmeticException();



    }

}
